<template>
  <page-wraper>
    <theme-control></theme-control>
    <view style="border: 10px solid #6cf; width: 100%; height: 1000px">
      <button @click="onHome">测试</button>
    </view>
  </page-wraper>
</template>

<script setup>
import { onLoad } from '@dcloudio/uni-app'
import { preLoadIndex } from '@/utils/prehandle'
import { helloworld } from '../../api/test'

onLoad(() => {
  preLoadIndex() // 首页渲染完成后必须进行相关预处理

  helloworld()
    .then((res) => {
      console.log('helloword', res)
    })
    .catch((error) => {
      console.log(error)
    })
})

function onHome() {
  uni.navigateTo({
    url: '/pages/test/test?v=1'
  })
}
</script>

<style></style>
